home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / dev / c / CLib37x.readme < prev    next >
Text File  |  1997-11-02  |  15KB  |  324 lines

  1. Short:    Example.library in 100% C (SAS/Storm/Maxon/GCC/...)
  2. Author:   Andreas R. Kleinert, Helmut Hummel, Stefan Fuchs, Aaron Digulla, Gunther Nikl
  3. Uploader: Andreas_Kleinert@t-online.de
  4. Type:     dev/c
  5.  
  6.  
  7.   example.library V37.17 (24.10.97)
  8.  
  9.   An Amiga shared library in 100 % C language - coming with sources.
  10.  
  11.   Compiler Checklist:        Compiler           Support
  12.                              -------------------------------
  13.    (see README.<compiler>    SAS/C 6.5x         yes
  14.     for more information)    MaxonC 3.x         yes
  15.                              StormC 2.x         yes
  16.                              DICE 3.x           (not tested)
  17.                              GCC 2.7.2.1        yes
  18.                              AztecC             (not tested)
  19.                              vbcc               (in work)
  20.  
  21.   OS Checklist:              Operating Sustem   Support
  22.                              -------------------------------
  23.                              Amiga OS 37-40     yes
  24.                              AROS 1.x           yes (AROS source tree)
  25.  
  26.  
  27.   Original SAS/C and StormC version (C) 1996-97 by Andreas R. Kleinert,
  28.   MaxonC version changes done 1996 by Helmut Hummel.
  29.   GCC version changes done 1997 by Stefan Fuchs and Gunter Nikl.
  30.   AROS source tree done 1997 by Aaron Digulla.
  31.   All rights reserved.
  32.   ----------------------------------------------------------------------
  33.   This sample library intends to make Amiga shared library sources
  34.   compileable with any available Amiga C compiler - without any
  35.   changes to the source code.
  36.   And maybe in the future also running under any Amiga compatible
  37.   operating system with any CPU.
  38.  
  39.   The first goal seams to be easily done: nearly any noticeable compiler
  40.   for the Amiga does support generation of libraries by special
  41.   linker commands and pre-generated object files.
  42.  
  43.   But when looking into the details, one will find out, that these
  44.   linker functionality just reduces the influence of the programmer
  45.   on how his sources are handled, that the pre-generated object
  46.   files just originally were done in Assembler, and that each compiler
  47.   does define its own interface definitions and usage rules.
  48.  
  49.   But as a programmer, it is important to have control over the _complete_
  50.   source code and to be able to compile it _anywhere_ with only
  51.   minor changes, even better without any changes.
  52.  
  53.   Since most Amiga system modules - noticeable Libraries, Devices and
  54.   Resources - do have startup-modules and other larger parts completely
  55.   written in Assembler language, the most important task for getting
  56.   inter-compiler and operating system independant sources in my opinion
  57.   is, to completely migrate the interfaces to C language (but different
  58.   to AROS, for example, it is most important, to keep the sources running
  59.   under the current 68k AmigaOS in the _first_ place).
  60.  
  61.   This goal basically has been reached already, still missing of
  62.   course are some of the less Amiga-native compilers and of course
  63.   tests with any kind of "AmigaOS for PowerPC".
  64.  
  65.   But since Assembler is nearly as portability-hostile as BCPL _today_
  66.   we may come quite close to the goal defined above by just moving
  67.   towards C.
  68.  
  69.   Translate your 68k-assembler library startup-codes smartly
  70.   to C by simply using this source-code as an advice how to do it.
  71.  
  72.   For testing: install the (re)compiled example.library to LIBS: and
  73.   start the test program - it should pop up a requester, then.
  74.  
  75.   If you can submit adjustments for the other compilers as mentioned
  76.   above: feel free to send these.
  77.   ---
  78.   Feel free to use this source for own projects.
  79.  
  80.   It is allowed to be spread and distributed anywhere, as far
  81.   as my consent is concerned.
  82.  
  83.   Amiga International, or the current owner of the technologie,
  84.   is allowed to always put this source on their newest
  85.   Developer CD-ROM.
  86.  
  87.   Thanks and credits will always be appreciated - for example,
  88.   you MAY, but NEED NOT:
  89.   give me credits in your program's docs, send me keyfiles for
  90.   your programs using the library, and so on.
  91.   But that's simply voluntarily.
  92.  
  93.    _________________________________________________________
  94.   |      You may reach me the following way.                |
  95.   |    Send bug-reports, money or whatever to:              |
  96.   |---------------------------------------------------------|
  97.   |        * SuperView Development & Registration *         |
  98.   |          * DRAFU Development & Registration *           |
  99.   |       * Image Engineer Registration Site Europe *       |
  100.   |                                                         |
  101.   |                                                         |
  102.   |                  PerSuaSiVe SoftWorX                    |
  103.   |                                                         |
  104.   |                  Andreas R. Kleinert                    |
  105.   |                  Sandstrasse 1                          |
  106.   |                  D-57072 Siegen                         |
  107.   |                  Germany, Europe                        |
  108.   |                                                         |
  109.   | Any snail mail to the old address will still be routed. |
  110.   |                                                         |
  111.   |                  Phone:  +49-271-22869 also FAX + AM    |
  112.   |                          +49-271-22838                  |
  113.   |                                                         |
  114.   |                  Weekdays after 17.00h.                 |
  115.   |                                                         |
  116.   |         When calling via phone you may leave a message, |
  117.   |         if I'm not available - but don't expect me      |
  118.   |         calling back to USA, Australia, ... since       |
  119.   |         german phone rates are HIGHLY expensive.        |
  120.   |_________________________________________________________|
  121.  
  122.     http://home.t-online.de/home/Andreas_Kleinert/
  123.  
  124.   eMail:
  125.  
  126.         Please send binaries via ARK@COB.wwbnet.de, and keep
  127.         them smaller than 16 KB. Please think twice before
  128.         sending them - my postbox is not unlimited in size.
  129.  
  130.            - Fido    Andreas Kleinert 2:2457/350.18
  131.            - Usenet
  132.                      Andreas_Kleinert@superview.ftn.neckar-alb.de (Fido-Gate)
  133.                      Andreas_Kleinert@t-online.de                 (T-Online)
  134.                      ARK@COB.wwbnet.de                            (Z-Netz)
  135.                      ARK@amigaworld.com                           (AmigaWorld)
  136.  
  137.            - If nothing else works, try one of these public
  138.              Fido-Usenet gateways:
  139.  
  140.                In Germany:
  141.                  Andreas_Kleinert@p18.f350.n2457.z2.fido.sub.org
  142.  
  143.                From USA or elsewhere:
  144.                  Andreas_Kleinert@p18.f350.n2457.z2.fidonet.org
  145.  
  146.  
  147.  Known Bugs:        - some versions of DOpus and all Installer versions
  148.                       can't fetch the version information from the
  149.                       library binary due to some bugs in their code.
  150.                       Newer DOpus versions have this fixed and C:Version
  151.                       for example did that task always.
  152.  
  153.  
  154.  History:
  155.  
  156.  V37.17 (24.10.97): - updated "ReadMe_MAXON" and added a bug-description
  157.                       (plus workaround) as supplied by Stephan Rupprecht
  158.                       <Rupprecht_Verwertung@t-online.de>
  159.  
  160.  V37.16 (23.8.97) : - V37.15 - frozen AROS spin-off
  161.                     - AROS-Version now included with AROS package, separately
  162.                     - added comments about Forbid/Permit/Wait/single-threading
  163.                       to the Library access functions
  164.                     - also commented the rest a little bit
  165.                       (-> maybe some certain people from comp.sys.amiga.programmer
  166.                           now feel better - but then again... maybe not ;)
  167.  
  168.  V37.14 (13.8.97) : - AROS: - the LH1_ to LH2_ macro replacements in
  169.                               "compiler.h" had been wrongly defined
  170.                             - "BPTR" type only was available under AROS,
  171.                               now using "struct SegList *"
  172.                             - AROS version now does compile under AmigaOS
  173.                               with SAS/C 6.58, too
  174.                     - "APTR seglist" now "struct SegList *"
  175.  
  176.  V37.13 (19.7.97) : - GNU makefile had lost its TABs
  177.                       (-> Gunter Nikl)
  178.  
  179.  V37.12 (29.6.97) : - fixed memory bug-fix (argh)
  180.                       (-> Gunter Nikl)
  181.                     - changed/applied GCC adjustments
  182.                       (-> diffs by Gunter Nikl)
  183.  
  184.  V37.11 (24.6.97) : - added "known bugs" section
  185.                     - LibInit now delocates library base on error
  186.                       (NULL return)
  187.                       (-> Gunter Nikl)
  188.                     - added AROS version, and created an additional
  189.                       source tree for it, since I did not get it compiled
  190.                       with SAS/C 6.57 and there's perhaps additional
  191.                       #ifdef stuf to be done. Anyone likes to merge these ?
  192.                       (-> Aaron Digulla)
  193.  
  194.  V37.10 (6.4.97) :  - added GCC version by Stefan Fuchs, snfuchs@sokrates.franken.de.
  195.                       Thanks !
  196.                     - some small changes to docs, includes and comments
  197.                     - still missing: DICE, Aztec, vbcc. Who does it ?
  198.                     - fixed ftn email address
  199.  
  200.  V37.6 (27.3.97) :  - finetuning
  201.  
  202.  V37.5 (24.1.97) :  - rewrote docs
  203.                     - added basic support for compiler independent
  204.                       register naming and SAS/C keyword replacements
  205.                       (compiler.h). Thus sources now should be easily
  206.                       adaptable for GCC as well.
  207.  
  208.  V37.4 (8.1.97) :   - added FD file
  209.                     - added new pragma file (and dir) as
  210.                       include/pragma/example_lib.h
  211.                       which works with Aztec, Maxon, Storm,
  212.                       DICE and SAS C compilers.
  213.                       Thanks to fd2pragma and Dirk Stoecker.
  214.                     - some fixes to the readme files
  215.                     - updated eMail list
  216.  
  217.  V37.3 (3.1.97) :   - slightly changed SCOPTIONS
  218.                     - fixed some style things (APTR and library casts)
  219.                     - changed note about library opening at L_OpenLibs()
  220.                     - now compileable with StormC 2.0 as well
  221.                       (not tested with 1.1) - see readme file for StormC
  222.                     - added project file for StormC 2.0, smakefile still
  223.                       present - select, which one you'd like to use
  224.  
  225.  V37.2 (12.12.96) : - applied some more changes and fixes
  226.                       (-> suggested by Helmut Hummel)
  227.                     - added icons
  228.                       (-> from Helmut Hummel)
  229.  
  230.  V37.1 (4.12.96) : - bumped version to V37
  231.                    - added MaxonC 3.x version by applying changes
  232.                      to the SAS/C sources and adding Maxon
  233.                      specific make and configuration files
  234.                      (-> all done by Helmut Hummel, see Readme.MAXON)
  235.                    - added StormC support
  236.                    - yet missing: DICE, Aztec, GNU. Who does it ?
  237.  
  238.  V1.4 (30.11.96) : - added SAS/C specific Ctrl-C disabling code
  239.                    - made some workarounds compiler sensitive
  240.                    - redone all with SAS/C V6.57
  241.                    - 944 Bytes ;-)
  242.  
  243.  V1.3 (13.9.96) :  - when starting lib as executable, -1 must be returned
  244.                    - now caching SysBase
  245.                    - added some comments, where changes should not
  246.                      be applied
  247.                    - added note about sharing library bases
  248.                    - documented and modified sample function,
  249.                      so that correct a0/a1/d0/d1 and a6 usage becomes
  250.                      more obviously and verbose
  251.                    - still 940 bytes ;-)
  252.  
  253.  V1.2 (5.9.96)  :  - fixed some things resulting out of a
  254.                      discussion in Z-Netz
  255.  
  256.  V1.1 (1.9.96)  :  - small changes in style
  257.                      (only bumped versions of changed modules):
  258.                        o moved "examplebase.h" to include/example/
  259.                          (so also adjusted LibInit.c, StartUp.c
  260.                           and SCOPTIONS for reflecting that)
  261.                        o SampleFuncs.h did contain wrong prototype
  262.                          (did not matter, since only used for
  263.                           ULONG function table within StartUp.c)
  264.                        o explicitely __aligned ROMTag structure
  265.  
  266.  V1.0 (14.8.96) : - first release
  267.  
  268.  
  269.  ---
  270.  All mentioned trademarks are subject to their owners.
  271.  
  272.  
  273. ============================= Archive contents =============================
  274.  
  275. Original  Packed Ratio    Date     Time    Name
  276. -------- ------- ----- --------- --------  -------------
  277.     1720     433 74.8% 11-Dec-96 15:39:54 +bin.info
  278.     5248    3480 33.6% 05-Dec-96 11:46:22 +TestExampleLib
  279.      450     230 48.8% 11-Dec-96 15:49:34 +TestExampleLib.info
  280.      888     602 32.2% 22-Aug-97 09:45:58 +example.library
  281.     2101    1066 49.2% 23-Aug-97 11:40:22 +ReadMe.AROS
  282.     1884     861 54.2% 01-Apr-97 11:27:18 +ReadMe.GCC
  283.     1708     921 46.0% 24-Oct-97 12:40:30 +ReadMe.MAXON
  284.      486     280 42.3% 27-Mar-97 10:33:08 +ReadMe.SAS
  285.      915     480 47.5% 25-Jan-97 10:21:12 +ReadMe.STORM
  286.    12381    4444 64.1% 24-Oct-97 12:42:00 +ReadMe_First
  287.     1720     433 74.8% 11-Dec-96 15:39:56 +source.info
  288.      125     117  6.4% 08-Jan-97 19:09:50 +example.fd
  289.      425     247 41.8% 05-Dec-96 11:45:24 +example_protos.h
  290.      289     185 35.9% 05-Dec-96 11:44:58 +example.h
  291.      654     319 51.2% 11-Dec-96 15:00:22 +examplebase.h
  292.      477     247 48.2% 08-Jan-97 19:10:26 +example_lib.h
  293.      311     207 33.4% 05-Dec-96 11:45:38 +example_pragmas.h
  294.      330     207 37.2% 05-Dec-96 11:45:50 +example.h
  295.     1720     433 74.8% 11-Dec-96 15:39:42 +lib_source.info
  296.     3809    1234 67.6% 29-Jun-97 20:30:28 +compiler.h
  297.      888     602 32.2% 22-Aug-97 09:45:56 +example.library
  298.     5095    1820 64.2% 22-Aug-97 09:45:46 +LibInit.c
  299.      888     544 38.7% 22-Aug-97 09:45:56 +LibInit.o
  300.       25      25  0.0% 05-Dec-96 12:07:46 +make_storm.bat
  301.      427     223 47.7% 19-Jul-97 14:07:00 +makefile.gcc
  302.      419     164 60.8% 11-Dec-96 15:31:14 +makefile.MAXON
  303.      347     232 33.1% 05-Dec-96 11:36:28 +makefile.MAXON.info
  304.      381     232 39.1% 05-Dec-96 11:36:28 +mcpp.SESSION
  305.     1591     824 48.2% 29-Jun-97 20:20:48 +SampleFuncs.c
  306.      370     248 32.9% 29-Jun-97 20:20:40 +SampleFuncs.h
  307.      216     194 10.1% 29-Jun-97 20:30:08 +SampleFuncs.o
  308.      128     105 17.9% 03-Jan-97 15:29:36 +SCOPTIONS
  309.      395     148 62.5% 05-Dec-96 11:36:28 +smakefile
  310.       95      85 10.5% 05-Dec-96 11:36:28 +smakefile.wth
  311.     9689    2399 75.2% 22-Aug-97 09:30:48 +StartUp.c
  312.      824     509 38.2% 22-Aug-97 09:30:56 +StartUp.o
  313.     1757     595 66.1% 03-Jan-97 15:44:56 +storm_project.¶
  314.      624     350 43.9% 03-Jan-97 15:44:56 +storm_project.¶.info
  315.      622     269 56.7% 03-Jan-97 15:44:30 +storm_smakefile
  316.      119     100 15.9% 05-Dec-96 11:36:28 +SCOPTIONS
  317.      256     105 58.9% 05-Dec-96 11:36:28 +smakefile
  318.     5248    3480 33.6% 05-Dec-96 11:46:22 +TestExampleLib
  319.      673     374 44.4% 05-Dec-96 11:46:12 +TestExampleLib.c
  320.      835     394 52.8% 05-Dec-96 11:36:28 +TestExampleLib.info
  321.      300     242 19.3% 05-Dec-96 11:46:20 +TestExampleLib.o
  322. -------- ------- ----- --------- --------
  323.    69853   30689 56.0% 25-Oct-97 12:54:40   45 files
  324.